#! /bin/sh

# execute this script from the top-level directory
HOSTNAME=`hostname`

CC=cc
CXX=CC
F77=f77
FC=f90
FFLAGS="-native -fast -xO5 -dalign"
FCFLAGS="-native -fast -xO5 -dalign"
CFLAGS="-native -fast -xO5 -dalign"
CXXFLAGS="-native -fast -xO5 -dalign"
CPPFLAGS="-I$HOME/install/include" 
LDFLAGS="-L$HOME/install/lib" 
MAKE=make

export CC CXX F77 FC LDFLAGS CFLAGS FFLAGS FCFLAGS CPPFLAGS CXXFLAGS MAKE

rm -rf $HOSTNAME
mkdir $HOSTNAME

( 
  cd $HOSTNAME
  ../configure --disable-single
  $MAKE -k; $MAKE -k; $MAKE -k benchmark; $MAKE clean
  ../configure --enable-single
  $MAKE -k; $MAKE -k; $MAKE -k benchmark; $MAKE clean
  ../configure --disable-single
  $MAKE -k; $MAKE -k; $MAKE -k accuracy; $MAKE clean
  ../configure --enable-single
  $MAKE -k; $MAKE -k; $MAKE -k accuracy; $MAKE clean
  $MAKE collect
)
